package com.project.system.domain.entity;

import com.project.common.domain.po.DbBase;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.time.LocalDateTime;

/**
 * @author : [chg]
 * @className : LeaveRecord
 * @description : 请假记录实体
 * @createTime : [2025/7/9 11:30]
 */
@Entity
@Data
@Table(name = "tb_employee_leave_record")
@org.hibernate.annotations.Table(appliesTo = "tb_employee_leave_record", comment = "请假记录")
public class HrLeaveRecord extends DbBase {
    @Column(columnDefinition = "bigint DEFAULT NULL COMMENT '用户ID'")
    private Long userId; // 用户ID
    
    @Column(columnDefinition = "int DEFAULT NULL COMMENT '请假类型（1-事假,2-病假,3-年假,4-婚假）'")
    private Integer leaveType; // 请假类型（1-事假,2-病假,3-年假,4-婚假）
    
    @Column(columnDefinition = "datetime DEFAULT NULL COMMENT '开始时间'")
    private LocalDateTime startTime; // 开始时间
    
    @Column(columnDefinition = "datetime DEFAULT NULL COMMENT '结束时间'")
    private LocalDateTime endTime; // 结束时间
    
    @Column(columnDefinition = "varchar(500) DEFAULT NULL COMMENT '请假说明'")
    private String description; // 请假说明

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '申请状态（1-待审批,2-已批准,3-已拒绝）'")
    private Integer status;

    @Column(columnDefinition = "varchar(500) DEFAULT NULL COMMENT '审批备注'")
    private String approvalRemark;
}